package com.quanyan.pay.api.wechat.service;

import com.quanyan.pay.api.wechat.vo.*;

/**
 * 微信支付相关、公众号相关API接口封装类
 * Created by Zheng.Ke
 * Date 2017/2/15.
 */
public interface WechatAPIService {
    /**
     * 查询订单
     * 具体参见文档  https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_2&index=4
     * @param vo
     * @return
     */
    WxOrderQueryRespVo orderQuery(WxOrderQueryReqVo vo);

    /**
     * 统一下单
     * @param vo
     * 具体参见文档  https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_1
     * @return
     */
    WxUnifiedOrderRespVo unifiedOrder(WxUnifiedOrderReqVo vo);

    /**
     * 关闭订单
     * @param vo
     * 具体参见文档  https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_3&index=5
     * @return
     */
    WxCloseOrderRespVo closeOrder(WxCloseOrderReqVo vo);

    /**
     * 申请退款
     * @param vo
     * 具体参见文档  https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_4
     * @return
     */
    WxRefundRespVo refund(WxRefundReqVo vo);

    /**
     * 查询退款
     * @param vo
     * 具体参见文档  https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_5
     * @return
     */
    WxRefundQueryRespVo refundQuery(WxRefundQueryReqVo vo);

    /**
     * 下载对账单
     * @param vo
     * @return
     * 具体参见文档  https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_6
     */
    WxDownloadBillRespVo downloadBill(WxDownloadBillReqVo vo);

    /**
     * 校验签名
     * @param vo
     * @return
     * 具体参见文档  https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=4_3
     */
    boolean verifySign(WxPayNotifyParamsVo vo, String apiKey);

    /**
     * 提交刷卡支付API
     * @param vo
     * @return
     * 具体参见文档  https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=9_10&index=1
     */
    WxMicroPayRespVo microPay(WxMicroPayReqVo vo);

    /**
     * 撤销订单API(刷卡支付)
     * @param vo
     * @return
     * 具体参见文档  https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=9_11&index=3
     */
    WxReverseRespVo reverse(WxReverseReqVo vo);

    /**
     * 授权码查询OPENID接口
     * @param vo
     * @return
     * 具体参见文档  https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=9_13&index=9
     */
    WxAuthCodeToOpenIdRespVo authCodeToOpenId(WxAuthCodeToOpenIdReqVo vo);

    /**
     * 企业付款API
     * @param vo
     * @return
     * 具体参见文档  https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=14_2
     */
    WxTransfersRespVo transfers(WxTransfersReqVo vo);

    /**
     * 查询企业付款API
     * @param vo
     * @return
     * 具体参见文档  https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=14_3
     */
    WxGetTransferInfoRespVo getTransferInfo(WxGetTransferInfoReqVo vo);

    /**
     * 通过code换取网页授权access_token
     * @param vo
     * @return
     * 具体参见文档  https://mp.weixin.qq.com/wiki/4/9ac2e7b1f1d22e9e57260f6553822520.html#.E7.AC.AC.E4.BA.8C.E6.AD.A5.EF.BC.9A.E9.80.9A.E8.BF.87code.E6.8D.A2.E5.8F.96.E7.BD.91.E9.A1.B5.E6.8E.88.E6.9D.83access_token
     */
    WxOauthRespVo oauth(WxOauthReqVo vo);

}
